IOMMU: make page table population preemptible
authorJan Beulich <jbeulich@suse.com>
Tue, 7 Jan 2014 13:21:48 +0000 (14:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 7 Jan 2014 13:21:48 +0000 (14:21 +0100)
commit3e06b9890c0a691388ace5a6636728998b237b90
tree9b2cbbe341db56ea4ac454bbb23dc4809ccca656
parent9a80d5056766535ac624774b96495f8b97b1d28b
IOMMU: make page table population preemptible

Since this can take an arbitrary amount of time, the rooting domctl as
well as all involved code must become aware of this requiring a
continuation.

The subject domain's rel_mem_list is being (ab)used for this, in a way
similar to and compatible with broken page offlining.

Further, operations get slightly re-ordered in assign_device(): IOMMU
page tables now get set up _before_ the first device gets assigned, at
once closing a small timing window in which the guest may already see
the device but wouldn't be able to access it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
xen/arch/x86/domain.c
xen/arch/x86/mm/p2m-pod.c
xen/drivers/passthrough/iommu.c
xen/include/xen/sched.h